package com.geovis.emergency.spd.biz.pc.service;


import com.baomidou.mybatisplus.extension.service.IService;
import com.geovis.common.mybatis.page.PageParam;
import com.geovis.common.mybatis.page.PageResult;
import com.geovis.emergency.spd.entity.pc.entity.PcMessage;
import com.geovis.emergency.spd.entity.pc.pojo.vo.PcMessageVO;

import java.util.List;
import java.util.Set;

/**
 * <p>
 * 应急预案指挥模块-消息通知 服务类
 * </p>
 *
 * @author 曾德实
 * @since 2022-04-30
 */
public interface IPcMessageService extends IService<PcMessage> {

    /**
     * 分页查询
     *
     * @param pageParam
     * @return
     */
    PageResult<PcMessageVO> listPage(PageParam<PcMessage> pageParam);

    /**
     * 一键已读
     */
    void onKeyRead(String messageId);

    /**
     * 获取最新一条未读消息
     * @param type
     * @param pcDrillId
     * @return
     */
    PcMessageVO getLatestUnreadMessage(String type,String pcDrillId);
    /**
     * 未读消息数量
     * @return
     */
    Long unReadCount();
    /**
     * socket消息发送
     */
    void sendSocketMessage(PcMessage pcMessage);

    void sendSocketMessage(PcMessage pcMessage, Set<String> userList);
    /**
     * socket消息发送
     */
    void sendSocketMessage(String eventName);


    void sendSocketMessage(String eventName, Object data, Set<String> userList);

    void sendSocketMessage(String eventName, Object data);
    /**
     * 保存并发送移动端消息
     * @param pcMessage
     */
    void sendMobileMessage(PcMessage pcMessage);



}
